package com.website.view.component
{
	import com.website.util.Constant;
	
	import flash.events.MouseEvent;
	
	import com.greensock.TweenMax;

	public class ScreenBtn extends ClickBtnComp
	{
		private var _screenicon:ScreenIcon;
		public function ScreenBtn(textStr:String,rollOverColor:String, isBig:Boolean = false)
		{
			super(textStr,rollOverColor);
			_screenicon = new ScreenIcon(isBig);
			_screenicon.x = field.x + field.width + 2;
			_screenicon.y = 5;
			addChild(_screenicon);
		}
		
		override protected function rollOut(event:MouseEvent) : void
		{
			super.rollOut(event);
			TweenMax.to(_screenicon, Constant.fadeSpeed, {tint:Constant.coldColor, alpha:1, overwrite:true});
		}
		
		override protected function rollOver(event:MouseEvent) : void
		{
			super.rollOver(event);
			TweenMax.to(_screenicon, Constant.fadeSpeed, {tint:_rollOverColor, alpha:1, overwrite:true});
		}
	}
}